home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15142 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  38 lines

  1. Newsgroups: comp.lang.c,comp.lang.c++
  2. Path: news.inap.net!news1!ind-000-236-60
  3. From: dlmiller@iquest.net (Doug Miller)
  4. Subject: Re: H E L P
  5. X-Nntp-Posting-Host: ind-000-236-60.iquest.net
  6. Message-ID: <DpAx1J.4n9@iquest.net>
  7. Sender: news@iquest.net (News Admin)
  8. Organization: IQuest Network Services
  9. X-Newsreader: News Xpress Version 1.0 Beta #2.1
  10. References: <N.040296.013047.18@DynamicPPP-185.HIP.CAM.ORG> <Pine.A32.3.91.960402135001.121719B-100000@green.weeg.uiowa.edu> <4js6jh$ndr@solutions.solon.com>
  11. Date: Wed, 3 Apr 1996 19:36:58 GMT
  12.  
  13. seebs@solutions.solon.com (Peter Seebach) wrote:
  14. >In article <Pine.A32.3.91.960402135001.121719B-100000@green.weeg.uiowa.edu>,
  15. >The Amorphous Mass  <robinson@blue.weeg.uiowa.edu> wrote:
  16. >>On Tue, 2 Apr 1996 ramrod@cam.org wrote:
  17. >
  18. >>> The part that I am having a hard time with is the part that
  19. >>> whatever number I enter for the age, I'm supposed to get the same number
  20. >>> of happy faces, automatically.  For example If I say I am 45 years old,
  21. >>> then the program should show 45 happy faces.
  22. >
  23. >>  You need a loop.  Look up the for, while, and do while loop constructs  in
  24. >>your textbook.
  25. >
  26. >This is a bit strong.  You don't *need* a loop.  You just probably want one.
  27. >
  28. >Obviously, if you're assuming age, you would have no more than about 150 ifs
  29. >to test, (assuming humans), and if you just want to do it for 45, it's even
  30. >easier.
  31. >
  32.  
  33. Obviously you didn't read what he wrote.  To satisfy the conditions of the task as he stated it,
  34. he would need an infinite number of ifs ("whatever number I enter...").  I saw nothing in his
  35. statement of the task that placed any limits of any sort on the number -- thus, he *does* need
  36. a loop.
  37.  
  38.